/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.pig4cloud.pig.daemon.quartz.util;

import com.pig4cloud.pig.daemon.quartz.entity.SysJob;
import com.pig4cloud.pig.daemon.quartz.exception.TaskException;

/**
 * 定时任务调用接口
 * <p>
 * 定义不同类型任务的调用规范。
 * 所有任务类型（Java类、Spring Bean、REST、JAR）都需要实现此接口。
 * </p>
 *
 * @author lengleng
 * @date 2025/05/31
 */
public interface ITaskInvok {

	/**
	 * 执行任务方法
	 * <p>
	 * 根据任务配置信息，调用相应的任务执行方法。
	 * 不同类型的任务有不同的执行方式。
	 * </p>
	 * 
	 * @param sysJob 任务配置信息
	 * @throws TaskException 任务执行失败时抛出
	 */
	void invokMethod(SysJob sysJob) throws TaskException;

}
